package dao.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * Member entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "member", catalog = "cloud_ifw")
public class Member implements java.io.Serializable {

	// Fields

	private Long userId;
	private User user;
//	private String deviceBindCode;
	private String mobile;
	private String userName;
	private String regTime;

	// Property accessors
	@Id
	@Column(name = "userId", unique = true, nullable = false)
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

//	@Column(name = "device_bind_code", length = 32)
//	public String getDeviceBindCode() {
//		return this.deviceBindCode;
//	}
//
//	public void setDeviceBindCode(String deviceBindCode) {
//		this.deviceBindCode = deviceBindCode;
//	}

	@Column(name = "mobile", length = 11)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "userName", length = 100)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "regTime", length = 14)
	public String getRegTime() {
		return regTime;
	}
	
	public void setRegTime(String regTime) {
		this.regTime = regTime;
	}

}